package cn.tangsihai.pet.domain;

import cn.tangsihai.basic.domain.BasicDomain;
import cn.tangsihai.org.domain.Shop;
import cn.tangsihai.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class Pet extends BasicDomain {
    // 上架
    public static final int ONSALE_IN_PET = 1;
    // 下架
    public static final int OFFSALE_IN_PET = 0;

    private String name;
    private String resources;
    private BigDecimal saleprice;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date onsaletime;
    private Integer state;
    private BigDecimal costprice;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createtime = new Date();
    private Long type_id;
    private PetType type;
    private Long shop_id;
    private Shop shop;
    private Long user_id;
    private User user;
    private Long search_master_msg_id;
    private PetDetail detail = new PetDetail();
    private Long repertory;
    private List<Pet> pets = new ArrayList<>();
}
